//
//  WSAuthorReusableView.m
//  GroupFourFM
//
//  Created by dllo on 16/1/5.
//  Copyright © 2016年 GroupFour. All rights reserved.
//

#import "WSAuthorReusableView.h"
#import "WSSectionView.h"

@interface WSAuthorReusableView ()<WSSectionViewDelegate>

@property (nonatomic, strong) WSSectionView *sectionView;

@end

@implementation WSAuthorReusableView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self createSubView];
    }
    return self;
}

- (void)createSubView {

    self.sectionView = [[WSSectionView alloc] init];
    [self addSubview:self.sectionView];
    _sectionView.delegate = self;
    [self.sectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.edges.mas_equalTo(@0);
    }];
    
}

- (void)setTitle:(NSString *)title {

    _title = title;
    self.sectionView.title = title;
}

- (void)pushMoreViewControllerWithTitle:(NSString *)title num:(NSInteger)num {

    [self.delegate pushMoreViewControllerWithTitle:title num:num];
}

@end
